<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>ajax封装</title>
</head>
<body>
<button>发送请求</button>	

<script src="ajaxEncapsulation.js"></script>
<script>
	
document.querySelector('button').onclick = function(){	
	window.frankAjax({
		type:'get',
		url:'ajaxEncapsulation.php',
		dataType:'json',
		data:{
			usename:'test-frank',
			password:'test-123456'
		},
		success:function(res){
			console.log(res);
		}
	});
};
</script>



</body>
</html>